/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://code.google.com/p/google-apis-client-generator/
 * (build: 2013-06-05 16:09:48 UTC)
 * on 2013-06-18 at 18:37:02 UTC 
 * Modify at your own risk.
 */

package com.globallogic.myworkspace.userendpoint;

/**
 * Service definition for Userendpoint (v1).
 *
 * <p>
 * This is an API
 * </p>
 *
 * <p>
 * For more information about this service, see the
 * <a href="" target="_blank">API Documentation</a>
 * </p>
 *
 * <p>
 * This service uses {@link UserendpointRequestInitializer} to initialize global parameters via its
 * {@link Builder}.
 * </p>
 *
 * @since 1.3
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public class Userendpoint extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient {

  // Note: Leave this static initializer at the top of the file.
  static {
    com.google.api.client.util.Preconditions.checkState(
        com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 &&
        com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 15,
        "You are currently running with version %s of google-api-client. " +
        "You need at least version 1.15 of google-api-client to run version " +
        "1.15.0-rc of the  library.", com.google.api.client.googleapis.GoogleUtils.VERSION);
  }

  /**
   * The default encoded root URL of the service. This is determined when the library is generated
   * and normally should not be changed.
   *
   * @since 1.7
   */
  public static final String DEFAULT_ROOT_URL = "https://myworkspace-gl.appspot.com/_ah/api/";

  /**
   * The default encoded service path of the service. This is determined when the library is
   * generated and normally should not be changed.
   *
   * @since 1.7
   */
  public static final String DEFAULT_SERVICE_PATH = "userendpoint/v1/";

  /**
   * The default encoded base URL of the service. This is determined when the library is generated
   * and normally should not be changed.
   */
  public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH;

  /**
   * Constructor.
   *
   * <p>
   * Use {@link Builder} if you need to specify any of the optional parameters.
   * </p>
   *
   * @param transport HTTP transport, which should normally be:
   *        <ul>
   *        <li>Google App Engine:
   *        {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}</li>
   *        <li>Android: {@code newCompatibleTransport} from
   *        {@code com.google.api.client.extensions.android.http.AndroidHttp}</li>
   *        <li>Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
   *        </li>
   *        </ul>
   * @param jsonFactory JSON factory, which may be:
   *        <ul>
   *        <li>Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}</li>
   *        <li>Google GSON: {@code com.google.api.client.json.gson.GsonFactory}</li>
   *        <li>Android Honeycomb or higher:
   *        {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}</li>
   *        </ul>
   * @param httpRequestInitializer HTTP request initializer or {@code null} for none
   * @since 1.7
   */
  public Userendpoint(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
      com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
    this(new Builder(transport, jsonFactory, httpRequestInitializer));
  }

  /**
   * @param builder builder
   */
  Userendpoint(Builder builder) {
    super(builder);
  }

  @Override
  protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest<?> httpClientRequest) throws java.io.IOException {
    super.initialize(httpClientRequest);
  }

  /**
   * Create a request for the method "getAuthenticateUser".
   *
   * This request holds the parameters needed by the the userendpoint server.  After setting any
   * optional parameters, call the {@link GetAuthenticateUser#execute()} method to invoke the remote
   * operation.
   *
   * @param userName
   * @param userPassword
   * @return the request
   */
  public GetAuthenticateUser getAuthenticateUser(java.lang.String userName, java.lang.String userPassword) throws java.io.IOException {
    GetAuthenticateUser result = new GetAuthenticateUser(userName, userPassword);
    initialize(result);
    return result;
  }

  public class GetAuthenticateUser extends UserendpointRequest<com.globallogic.myworkspace.userendpoint.model.User> {

    private static final String REST_PATH = "user/{userName}/{userPassword}";

    /**
     * Create a request for the method "getAuthenticateUser".
     *
     * This request holds the parameters needed by the the userendpoint server.  After setting any
     * optional parameters, call the {@link GetAuthenticateUser#execute()} method to invoke the remote
     * operation. <p> {@link GetAuthenticateUser#initialize(com.google.api.client.googleapis.services.
     * AbstractGoogleClientRequest)} must be called to initialize this instance immediately after
     * invoking the constructor. </p>
     *
     * @param userName
     * @param userPassword
     * @since 1.13
     */
    protected GetAuthenticateUser(java.lang.String userName, java.lang.String userPassword) {
      super(Userendpoint.this, "GET", REST_PATH, null, com.globallogic.myworkspace.userendpoint.model.User.class);
      this.userName = com.google.api.client.util.Preconditions.checkNotNull(userName, "Required parameter userName must be specified.");
      this.userPassword = com.google.api.client.util.Preconditions.checkNotNull(userPassword, "Required parameter userPassword must be specified.");
    }

    @Override
    public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
      return super.executeUsingHead();
    }

    @Override
    public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
      return super.buildHttpRequestUsingHead();
    }

    @Override
    public GetAuthenticateUser setAlt(java.lang.String alt) {
      return (GetAuthenticateUser) super.setAlt(alt);
    }

    @Override
    public GetAuthenticateUser setFields(java.lang.String fields) {
      return (GetAuthenticateUser) super.setFields(fields);
    }

    @Override
    public GetAuthenticateUser setKey(java.lang.String key) {
      return (GetAuthenticateUser) super.setKey(key);
    }

    @Override
    public GetAuthenticateUser setOauthToken(java.lang.String oauthToken) {
      return (GetAuthenticateUser) super.setOauthToken(oauthToken);
    }

    @Override
    public GetAuthenticateUser setPrettyPrint(java.lang.Boolean prettyPrint) {
      return (GetAuthenticateUser) super.setPrettyPrint(prettyPrint);
    }

    @Override
    public GetAuthenticateUser setQuotaUser(java.lang.String quotaUser) {
      return (GetAuthenticateUser) super.setQuotaUser(quotaUser);
    }

    @Override
    public GetAuthenticateUser setUserIp(java.lang.String userIp) {
      return (GetAuthenticateUser) super.setUserIp(userIp);
    }

    @com.google.api.client.util.Key
    private java.lang.String userName;

    /**

     */
    public java.lang.String getUserName() {
      return userName;
    }

    public GetAuthenticateUser setUserName(java.lang.String userName) {
      this.userName = userName;
      return this;
    }

    @com.google.api.client.util.Key
    private java.lang.String userPassword;

    /**

     */
    public java.lang.String getUserPassword() {
      return userPassword;
    }

    public GetAuthenticateUser setUserPassword(java.lang.String userPassword) {
      this.userPassword = userPassword;
      return this;
    }

    @Override
    public GetAuthenticateUser set(String parameterName, Object value) {
      return (GetAuthenticateUser) super.set(parameterName, value);
    }
  }

  /**
   * Create a request for the method "insertRecommend".
   *
   * This request holds the parameters needed by the the userendpoint server.  After setting any
   * optional parameters, call the {@link InsertRecommend#execute()} method to invoke the remote
   * operation.
   *
   * @param email
   * @param title
   * @param resabstract
   * @param userName
   * @return the request
   */
  public InsertRecommend insertRecommend(java.lang.String email, java.lang.String title, java.lang.String resabstract, java.lang.String userName) throws java.io.IOException {
    InsertRecommend result = new InsertRecommend(email, title, resabstract, userName);
    initialize(result);
    return result;
  }

  public class InsertRecommend extends UserendpointRequest<com.globallogic.myworkspace.userendpoint.model.Recommend> {

    private static final String REST_PATH = "recommend/{email}/{title}/{resabstract}/{userName}";

    /**
     * Create a request for the method "insertRecommend".
     *
     * This request holds the parameters needed by the the userendpoint server.  After setting any
     * optional parameters, call the {@link InsertRecommend#execute()} method to invoke the remote
     * operation. <p> {@link InsertRecommend#initialize(com.google.api.client.googleapis.services.Abst
     * ractGoogleClientRequest)} must be called to initialize this instance immediately after invoking
     * the constructor. </p>
     *
     * @param email
     * @param title
     * @param resabstract
     * @param userName
     * @since 1.13
     */
    protected InsertRecommend(java.lang.String email, java.lang.String title, java.lang.String resabstract, java.lang.String userName) {
      super(Userendpoint.this, "POST", REST_PATH, null, com.globallogic.myworkspace.userendpoint.model.Recommend.class);
      this.email = com.google.api.client.util.Preconditions.checkNotNull(email, "Required parameter email must be specified.");
      this.title = com.google.api.client.util.Preconditions.checkNotNull(title, "Required parameter title must be specified.");
      this.resabstract = com.google.api.client.util.Preconditions.checkNotNull(resabstract, "Required parameter resabstract must be specified.");
      this.userName = com.google.api.client.util.Preconditions.checkNotNull(userName, "Required parameter userName must be specified.");
    }

    @Override
    public InsertRecommend setAlt(java.lang.String alt) {
      return (InsertRecommend) super.setAlt(alt);
    }

    @Override
    public InsertRecommend setFields(java.lang.String fields) {
      return (InsertRecommend) super.setFields(fields);
    }

    @Override
    public InsertRecommend setKey(java.lang.String key) {
      return (InsertRecommend) super.setKey(key);
    }

    @Override
    public InsertRecommend setOauthToken(java.lang.String oauthToken) {
      return (InsertRecommend) super.setOauthToken(oauthToken);
    }

    @Override
    public InsertRecommend setPrettyPrint(java.lang.Boolean prettyPrint) {
      return (InsertRecommend) super.setPrettyPrint(prettyPrint);
    }

    @Override
    public InsertRecommend setQuotaUser(java.lang.String quotaUser) {
      return (InsertRecommend) super.setQuotaUser(quotaUser);
    }

    @Override
    public InsertRecommend setUserIp(java.lang.String userIp) {
      return (InsertRecommend) super.setUserIp(userIp);
    }

    @com.google.api.client.util.Key
    private java.lang.String email;

    /**

     */
    public java.lang.String getEmail() {
      return email;
    }

    public InsertRecommend setEmail(java.lang.String email) {
      this.email = email;
      return this;
    }

    @com.google.api.client.util.Key
    private java.lang.String title;

    /**

     */
    public java.lang.String getTitle() {
      return title;
    }

    public InsertRecommend setTitle(java.lang.String title) {
      this.title = title;
      return this;
    }

    @com.google.api.client.util.Key
    private java.lang.String resabstract;

    /**

     */
    public java.lang.String getResabstract() {
      return resabstract;
    }

    public InsertRecommend setResabstract(java.lang.String resabstract) {
      this.resabstract = resabstract;
      return this;
    }

    @com.google.api.client.util.Key
    private java.lang.String userName;

    /**

     */
    public java.lang.String getUserName() {
      return userName;
    }

    public InsertRecommend setUserName(java.lang.String userName) {
      this.userName = userName;
      return this;
    }

    @Override
    public InsertRecommend set(String parameterName, Object value) {
      return (InsertRecommend) super.set(parameterName, value);
    }
  }

  /**
   * Create a request for the method "listUserResource".
   *
   * This request holds the parameters needed by the the userendpoint server.  After setting any
   * optional parameters, call the {@link ListUserResource#execute()} method to invoke the remote
   * operation.
   *
   * @param userName
   * @return the request
   */
  public ListUserResource listUserResource(java.lang.String userName) throws java.io.IOException {
    ListUserResource result = new ListUserResource(userName);
    initialize(result);
    return result;
  }

  public class ListUserResource extends UserendpointRequest<com.globallogic.myworkspace.userendpoint.model.MobileDataCollection> {

    private static final String REST_PATH = "mobiledata/{userName}";

    /**
     * Create a request for the method "listUserResource".
     *
     * This request holds the parameters needed by the the userendpoint server.  After setting any
     * optional parameters, call the {@link ListUserResource#execute()} method to invoke the remote
     * operation. <p> {@link ListUserResource#initialize(com.google.api.client.googleapis.services.Abs
     * tractGoogleClientRequest)} must be called to initialize this instance immediately after
     * invoking the constructor. </p>
     *
     * @param userName
     * @since 1.13
     */
    protected ListUserResource(java.lang.String userName) {
      super(Userendpoint.this, "GET", REST_PATH, null, com.globallogic.myworkspace.userendpoint.model.MobileDataCollection.class);
      this.userName = com.google.api.client.util.Preconditions.checkNotNull(userName, "Required parameter userName must be specified.");
    }

    @Override
    public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
      return super.executeUsingHead();
    }

    @Override
    public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
      return super.buildHttpRequestUsingHead();
    }

    @Override
    public ListUserResource setAlt(java.lang.String alt) {
      return (ListUserResource) super.setAlt(alt);
    }

    @Override
    public ListUserResource setFields(java.lang.String fields) {
      return (ListUserResource) super.setFields(fields);
    }

    @Override
    public ListUserResource setKey(java.lang.String key) {
      return (ListUserResource) super.setKey(key);
    }

    @Override
    public ListUserResource setOauthToken(java.lang.String oauthToken) {
      return (ListUserResource) super.setOauthToken(oauthToken);
    }

    @Override
    public ListUserResource setPrettyPrint(java.lang.Boolean prettyPrint) {
      return (ListUserResource) super.setPrettyPrint(prettyPrint);
    }

    @Override
    public ListUserResource setQuotaUser(java.lang.String quotaUser) {
      return (ListUserResource) super.setQuotaUser(quotaUser);
    }

    @Override
    public ListUserResource setUserIp(java.lang.String userIp) {
      return (ListUserResource) super.setUserIp(userIp);
    }

    @com.google.api.client.util.Key
    private java.lang.String userName;

    /**

     */
    public java.lang.String getUserName() {
      return userName;
    }

    public ListUserResource setUserName(java.lang.String userName) {
      this.userName = userName;
      return this;
    }

    @Override
    public ListUserResource set(String parameterName, Object value) {
      return (ListUserResource) super.set(parameterName, value);
    }
  }

  /**
   * Builder for {@link Userendpoint}.
   *
   * <p>
   * Implementation is not thread-safe.
   * </p>
   *
   * @since 1.3.0
   */
  public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder {

    /**
     * Returns an instance of a new builder.
     *
     * @param transport HTTP transport, which should normally be:
     *        <ul>
     *        <li>Google App Engine:
     *        {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}</li>
     *        <li>Android: {@code newCompatibleTransport} from
     *        {@code com.google.api.client.extensions.android.http.AndroidHttp}</li>
     *        <li>Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
     *        </li>
     *        </ul>
     * @param jsonFactory JSON factory, which may be:
     *        <ul>
     *        <li>Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}</li>
     *        <li>Google GSON: {@code com.google.api.client.json.gson.GsonFactory}</li>
     *        <li>Android Honeycomb or higher:
     *        {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}</li>
     *        </ul>
     * @param httpRequestInitializer HTTP request initializer or {@code null} for none
     * @since 1.7
     */
    public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
        com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
      super(
          transport,
          jsonFactory,
          DEFAULT_ROOT_URL,
          DEFAULT_SERVICE_PATH,
          httpRequestInitializer,
          false);
    }

    /** Builds a new instance of {@link Userendpoint}. */
    @Override
    public Userendpoint build() {
      return new Userendpoint(this);
    }

    @Override
    public Builder setRootUrl(String rootUrl) {
      return (Builder) super.setRootUrl(rootUrl);
    }

    @Override
    public Builder setServicePath(String servicePath) {
      return (Builder) super.setServicePath(servicePath);
    }

    @Override
    public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
      return (Builder) super.setHttpRequestInitializer(httpRequestInitializer);
    }

    @Override
    public Builder setApplicationName(String applicationName) {
      return (Builder) super.setApplicationName(applicationName);
    }

    @Override
    public Builder setSuppressPatternChecks(boolean suppressPatternChecks) {
      return (Builder) super.setSuppressPatternChecks(suppressPatternChecks);
    }

    @Override
    public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) {
      return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks);
    }

    @Override
    public Builder setSuppressAllChecks(boolean suppressAllChecks) {
      return (Builder) super.setSuppressAllChecks(suppressAllChecks);
    }

    /**
     * Set the {@link UserendpointRequestInitializer}.
     *
     * @since 1.12
     */
    public Builder setUserendpointRequestInitializer(
        UserendpointRequestInitializer userendpointRequestInitializer) {
      return (Builder) super.setGoogleClientRequestInitializer(userendpointRequestInitializer);
    }

    @Override
    public Builder setGoogleClientRequestInitializer(
        com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
      return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer);
    }
  }
}
